<template>
  <div>
    <button
        type="button"
        class="btn btn-outline-primary mr-2 mb-3"
        v-for="menu in menus"
        :key="menu.id"
        :class="{active: menu.active}"
        @click="activeButton(menu.tag)">
      {{ menu.text }}
    </button>
  </div>
</template>

<script>
export default {
  name: 'Todomenu',
  props: {
    menus: {
      type: Array,
      required: true
    }
  },
  methods: {
    activeButton (tag) {
      this.$emit('active', tag);
    }
  }
}
</script>
